projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68332b5
)
Eliminate internal copy/free inside navilink. (#751)
author
Robert Lipe
<robertlipe@users.noreply.github.com>
Mon, 1 Nov 2021 06:41:11 +0000
(
01:41
-0500)
committer
GitHub
<noreply@github.com>
Mon, 1 Nov 2021 06:41:11 +0000
(
01:41
-0500)
* C++ improvements inside Vcard. Add test.
* Eternal impedance mismatch on C vs C++ pointer ownership.
navilink.cc
patch
|
blob
|
history
diff --git
a/navilink.cc
b/navilink.cc
index 739ae123d2bf7b75f21a04fce2294842fad9f52c..2c15b620ac4af97d6df5e0cda09a3b633325de8e 100644
(file)
--- a/
navilink.cc
+++ b/
navilink.cc
@@
-402,9
+402,7
@@
decode_waypoint(const unsigned char* buffer)
auto* waypt = new Waypoint;
decode_position(buffer + 12, waypt);
- char* s = xstrdup((char*)buffer + 4);
- waypt->shortname = s;
- xfree(s);
+ waypt->shortname = (char*) buffer + 4;
waypt->icon_descr = icon_table[buffer[28]];
waypt->SetCreationTime(decode_datetime(buffer + 22));